//-----------------------------------------------------------------------
// <copyright file="a_SupplierService.cs" company="AACECOM">
//     Copyright (c) AACECOM. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

using System;
using System.Collections;
using ThoiTrang.Entities;
using ThoiTrang.Data;
    
namespace ThoiTrang.Business
{   
	/// <summary>
	/// 
	/// </summary> 
    public class a_SupplierService
    {
        #region a_Supplier

        public static void Createa_Supplier(a_Supplier a_Supplier)
        {            
            try
            {
                a_SupplierDAO a_SupplierDAO = new a_SupplierDAO();
                a_SupplierDAO.Createa_Supplier(a_Supplier);
            }            
            catch (Exception ex)
            {                
                throw ex;
            }
        }        

        public static void Updatea_Supplier(a_Supplier a_Supplier)
        {            
            try
            {
                a_SupplierDAO a_SupplierDAO = new a_SupplierDAO();
                a_SupplierDAO.Updatea_Supplier(a_Supplier);
            }           
            catch (Exception ex)
            {
                throw ex;
            }
        }        

        public static void Deletea_Supplier(int supplierID)
        {            
            try
            {
                a_SupplierDAO a_SupplierDAO = new a_SupplierDAO();
                a_SupplierDAO.Deletea_Supplier(supplierID);
            }            
            catch (Exception ex)
            {
                throw ex;
            }
        }
        
        public static a_Supplier Geta_Supplier(int supplierID)
        {            
            try
            {
                a_SupplierDAO a_SupplierDAO = new a_SupplierDAO();
                return a_SupplierDAO.Geta_Supplier(supplierID);                
            }            
            catch (Exception ex)
            {
                throw ex;
            }
        }                

        public static a_SupplierCollection Geta_SupplierList(a_SupplierColumns orderBy, OrderDirection orderDirection)
        {            
            try
            {
                a_SupplierDAO a_SupplierDAO = new a_SupplierDAO();
                return a_SupplierDAO.Geta_SupplierList(orderBy, orderDirection);
            }            
            catch (Exception ex)
            {
               throw ex;
            }
        }        

        public static a_SupplierCollection Geta_SupplierList(a_SupplierColumns orderBy, OrderDirection orderDirection, int page, int pageSize, out int totalRecords)
        {            
            try
            {
                a_SupplierDAO a_SupplierDAO = new a_SupplierDAO();
                return a_SupplierDAO.Geta_SupplierList(orderBy, orderDirection, page, pageSize, out totalRecords);
            }            
            catch (Exception ex)
            {
                throw ex;
            }
        }        

        #endregion
    }
}